/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.wskj.workbench.enums;

import com.wskj.common.enums.BaseEnum;
import lombok.Getter;

import java.util.Objects;

/**
 * tb_enroll_settlement
 * withdraw_status-提现状态 0：申请中 1：通过  2：拒绝
 * @author gun
 */
@Getter
public enum WithdrawStatusEnum implements BaseEnum<Integer> {

	/** 0-申请中 */
	APPLY_ING(0,"申请中"),
	/** 1-通过 */
	PASS(1,"通过"),
	/** 2-拒绝 */
	REFUSE(2,"拒绝")
	;

	private Integer value;

	private String desc;

	WithdrawStatusEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}

	public static WithdrawStatusEnum getEnumByValue(Integer value) {
		if (Objects.isNull(value)) {
			return null;
		}
		for (WithdrawStatusEnum item : WithdrawStatusEnum.values()) {
			if (item.value.equals(value)) {
				return item;
			}
		}
		return null;
	}
}
